const Koa = require('koa')
const { koaBody } = require('koa-body')
const bodyParser = require('koa-bodyparser')
const cors = require('@koa/cors')
const router = require('./app/router')

const app = new Koa()

app.use(koaBody({
    multipart: true
}))

app.use(cors({
    origin: '*'
}))
app.use(bodyParser())


app.use(router)

app.listen(3030, () => {
    console.log('Koa框架启动');
})